<%@ page isELIgnored="false" %>
<%@page import="java.util.Random"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<base href="/shopping/views/">
<head>
	<title>评价</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	
	<link href="front/css/bootstrap.min.css" rel="stylesheet" type="text/css">
	<link href="front/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
	<link href="front/css/templatemo_style.css" rel="stylesheet" type="text/css">	
</head>
<body style="background:rgba(0,0,0,.5);">
	<div class="container" style="position:relative;top:10px;">
		<div class="col-md-12">		
			<form class="form-horizontal templatemo-create-account templatemo-container"  action="" method="post">
			    <label>评价内容：</label><input id="content" type="text" />
			    <input id="orderid" type="hidden" value=""/>
			    <input id="commid" type="hidden" value=""/>
			    <input type="button" value="确认" class="btn btn-info" onClick="commonIt()" id="loginUser" >
				<input type="button" value="取消" class="btn btn-danger" id="cancalLogin" onClick="javascript:window.parent.close_div('commonsIt')" >
			</form>		
		</div>
	</div>
	<!-- Modal -->
	<!--<div class="modal fade" id="templatemo_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	  <div class="modal-dialog">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
	        <h4 class="modal-title" id="myModalLabel">使用协议</h4>
	      </div>
	      <div class="modal-body">
	      	<p>中文中文</p>
		  </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	      </div>
	    </div>
	  </div>
	</div>-->
	<script type="text/javascript" src="front/js/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="front/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="front/js/register.js"></script>
    <script type="text/javascript">
    
    function commonIt(){
    	var orderid=$("#orderid").val();
    	var commid=$("#commid").val();
    	var content=$("#content").val();
		$.ajax({
    		url:'../front/assess/add/'+orderid+"/"+commid,
    		data:{'content':content},
    		type:'POST',
    		dataType:'JSON',
    		success:function(data){
    			if(data.code="0000"){
    				alert("评价成功");
    				window.parent.close_div('commonsIt');
    			}else{
    				alert(data.msg);
    			}
    		}
    	});
	}
    </script>
</body>
</html>